/*
 * @Description: 分全宗统计
 * @Author: Zzt
 * @Date: 2022-12-07 15:09:57
 * @LastEditTime: 2023-03-04 11:31:47
 */
import { statRequest } from '@/utils/request';

/* 按档案类型统计档案容量 */
export interface IvolumeByTypeParams {}
export function volumeByType(data: IvolumeByTypeParams) {
  return statRequest({
    url: `/archive-volume/volume-by-archive-type/`,
    method: 'post',
    data
  });
}
/* 分全宗统计-按档案分类统计 */
export interface IVolumeByCategoryParams {
  archiveTypeIds?: any[];
  byear?: string;
  categorys?: any[];
  eyear?: string;
  fondsId?: number;
  formats?: any[];
  retentionPeriods?: any[];
  secrets?: any[];
  type?: number;
  units?: any[];
  year?: string;
}
export function volumeByCategory(data: IVolumeByCategoryParams) {
  return statRequest({
    url: `/archive-volume/getVolumeByArchiveTypeAndCategory/`,
    method: 'post',
    data
  });
}
/* 按保管期限统计档案容量 */
export interface IVolumeByPeriodParams {}
export function volumeByPeriod(data: IVolumeByPeriodParams) {
  return statRequest({
    url: `/archive-volume/volume-by-retention-period/`,
    method: 'post',
    data
  });
}
/* 按文件格式统计档案数量 */
export interface ICountsByFormatParams extends IVolumeByCategoryParams {}
export function countsByFormat(data: ICountsByFormatParams) {
  return statRequest({
    url: `/archive-volume/getVolumeByArchiveTypeAndFormat/`,
    method: 'post',
    data
  });
}
/* 分全宗统计-按密级统计 */
export interface IVolumeBySecretParams extends IVolumeByCategoryParams {}
export function volumeBySecret(data: IVolumeBySecretParams) {
  return statRequest({
    url: `/archive-volume/getVolumeByArchiveTypeAndSecret/`,
    method: 'post',
    data
  });
}
/* 分全宗统计-按时间统计 */
export interface IVolumeByTimeParams extends IVolumeByCategoryParams {}
export function volumeByTime(data: IVolumeByTimeParams) {
  return statRequest({
    url: `/archive-volume/getVolumeByArchiveTypeAndSecretAndTime/`,
    method: 'post',
    data
  });
}
/* 分全宗统计-按单位统计 */
export interface IVolumeByUnitParams extends IVolumeByCategoryParams {}
export function volumeByUnit(data: IVolumeByUnitParams) {
  return statRequest({
    url: `/archive-volume/getVolumeByArchiveTypeAndUnit/`,
    method: 'post',
    data
  });
}
/* 分全宗统计-按访问权限统计 */
export interface IVolumeByPermissParams extends IVolumeByCategoryParams {}
export function volumeByPermiss(data: IVolumeByPermissParams) {
  return statRequest({
    url: `/archive-volume/getVolumeByArchiveTypeOfPermiss/`,
    method: 'post',
    data
  });
}
